# coding: utf-8

"""
    Firefly III API Client

    This is the Python client for Firefly III API  # noqa: E501

    The version of the OpenAPI document: 1.4.0
    Contact: james@firefly-iii.org
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from firefly_iii_client.configuration import Configuration


class ExchangeRateAttributes(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
        'amount': 'str',
        'created_at': 'datetime',
        'date': 'date',
        'from_currency_code': 'str',
        'from_currency_decimal_places': 'int',
        'from_currency_id': 'int',
        'from_currency_name': 'str',
        'from_currency_symbol': 'str',
        'rate': 'float',
        'to_currency_code': 'str',
        'to_currency_decimal_places': 'int',
        'to_currency_id': 'int',
        'to_currency_symbol': 'str',
        'updated_at': 'datetime'
    }

    attribute_map = {
        'amount': 'amount',
        'created_at': 'created_at',
        'date': 'date',
        'from_currency_code': 'from_currency_code',
        'from_currency_decimal_places': 'from_currency_decimal_places',
        'from_currency_id': 'from_currency_id',
        'from_currency_name': 'from_currency_name',
        'from_currency_symbol': 'from_currency_symbol',
        'rate': 'rate',
        'to_currency_code': 'to_currency_code',
        'to_currency_decimal_places': 'to_currency_decimal_places',
        'to_currency_id': 'to_currency_id',
        'to_currency_symbol': 'to_currency_symbol',
        'updated_at': 'updated_at'
    }

    def __init__(self, amount=None, created_at=None, date=None, from_currency_code=None, from_currency_decimal_places=None, from_currency_id=None, from_currency_name=None, from_currency_symbol=None, rate=None, to_currency_code=None, to_currency_decimal_places=None, to_currency_id=None, to_currency_symbol=None, updated_at=None, local_vars_configuration=None):  # noqa: E501
        """ExchangeRateAttributes - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._amount = None
        self._created_at = None
        self._date = None
        self._from_currency_code = None
        self._from_currency_decimal_places = None
        self._from_currency_id = None
        self._from_currency_name = None
        self._from_currency_symbol = None
        self._rate = None
        self._to_currency_code = None
        self._to_currency_decimal_places = None
        self._to_currency_id = None
        self._to_currency_symbol = None
        self._updated_at = None
        self.discriminator = None

        if amount is not None:
            self.amount = amount
        if created_at is not None:
            self.created_at = created_at
        if date is not None:
            self.date = date
        if from_currency_code is not None:
            self.from_currency_code = from_currency_code
        if from_currency_decimal_places is not None:
            self.from_currency_decimal_places = from_currency_decimal_places
        if from_currency_id is not None:
            self.from_currency_id = from_currency_id
        if from_currency_name is not None:
            self.from_currency_name = from_currency_name
        if from_currency_symbol is not None:
            self.from_currency_symbol = from_currency_symbol
        if rate is not None:
            self.rate = rate
        if to_currency_code is not None:
            self.to_currency_code = to_currency_code
        if to_currency_decimal_places is not None:
            self.to_currency_decimal_places = to_currency_decimal_places
        if to_currency_id is not None:
            self.to_currency_id = to_currency_id
        if to_currency_symbol is not None:
            self.to_currency_symbol = to_currency_symbol
        if updated_at is not None:
            self.updated_at = updated_at

    @property
    def amount(self):
        """Gets the amount of this ExchangeRateAttributes.  # noqa: E501

        The amount in the \"to\"-currency, if provided in the request.  # noqa: E501

        :return: The amount of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._amount

    @amount.setter
    def amount(self, amount):
        """Sets the amount of this ExchangeRateAttributes.

        The amount in the \"to\"-currency, if provided in the request.  # noqa: E501

        :param amount: The amount of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._amount = amount

    @property
    def created_at(self):
        """Gets the created_at of this ExchangeRateAttributes.  # noqa: E501


        :return: The created_at of this ExchangeRateAttributes.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this ExchangeRateAttributes.


        :param created_at: The created_at of this ExchangeRateAttributes.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

    @property
    def date(self):
        """Gets the date of this ExchangeRateAttributes.  # noqa: E501


        :return: The date of this ExchangeRateAttributes.  # noqa: E501
        :rtype: date
        """
        return self._date

    @date.setter
    def date(self, date):
        """Sets the date of this ExchangeRateAttributes.


        :param date: The date of this ExchangeRateAttributes.  # noqa: E501
        :type: date
        """

        self._date = date

    @property
    def from_currency_code(self):
        """Gets the from_currency_code of this ExchangeRateAttributes.  # noqa: E501


        :return: The from_currency_code of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._from_currency_code

    @from_currency_code.setter
    def from_currency_code(self, from_currency_code):
        """Sets the from_currency_code of this ExchangeRateAttributes.


        :param from_currency_code: The from_currency_code of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._from_currency_code = from_currency_code

    @property
    def from_currency_decimal_places(self):
        """Gets the from_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501


        :return: The from_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501
        :rtype: int
        """
        return self._from_currency_decimal_places

    @from_currency_decimal_places.setter
    def from_currency_decimal_places(self, from_currency_decimal_places):
        """Sets the from_currency_decimal_places of this ExchangeRateAttributes.


        :param from_currency_decimal_places: The from_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501
        :type: int
        """

        self._from_currency_decimal_places = from_currency_decimal_places

    @property
    def from_currency_id(self):
        """Gets the from_currency_id of this ExchangeRateAttributes.  # noqa: E501


        :return: The from_currency_id of this ExchangeRateAttributes.  # noqa: E501
        :rtype: int
        """
        return self._from_currency_id

    @from_currency_id.setter
    def from_currency_id(self, from_currency_id):
        """Sets the from_currency_id of this ExchangeRateAttributes.


        :param from_currency_id: The from_currency_id of this ExchangeRateAttributes.  # noqa: E501
        :type: int
        """

        self._from_currency_id = from_currency_id

    @property
    def from_currency_name(self):
        """Gets the from_currency_name of this ExchangeRateAttributes.  # noqa: E501


        :return: The from_currency_name of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._from_currency_name

    @from_currency_name.setter
    def from_currency_name(self, from_currency_name):
        """Sets the from_currency_name of this ExchangeRateAttributes.


        :param from_currency_name: The from_currency_name of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._from_currency_name = from_currency_name

    @property
    def from_currency_symbol(self):
        """Gets the from_currency_symbol of this ExchangeRateAttributes.  # noqa: E501


        :return: The from_currency_symbol of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._from_currency_symbol

    @from_currency_symbol.setter
    def from_currency_symbol(self, from_currency_symbol):
        """Sets the from_currency_symbol of this ExchangeRateAttributes.


        :param from_currency_symbol: The from_currency_symbol of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._from_currency_symbol = from_currency_symbol

    @property
    def rate(self):
        """Gets the rate of this ExchangeRateAttributes.  # noqa: E501


        :return: The rate of this ExchangeRateAttributes.  # noqa: E501
        :rtype: float
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """Sets the rate of this ExchangeRateAttributes.


        :param rate: The rate of this ExchangeRateAttributes.  # noqa: E501
        :type: float
        """

        self._rate = rate

    @property
    def to_currency_code(self):
        """Gets the to_currency_code of this ExchangeRateAttributes.  # noqa: E501


        :return: The to_currency_code of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._to_currency_code

    @to_currency_code.setter
    def to_currency_code(self, to_currency_code):
        """Sets the to_currency_code of this ExchangeRateAttributes.


        :param to_currency_code: The to_currency_code of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._to_currency_code = to_currency_code

    @property
    def to_currency_decimal_places(self):
        """Gets the to_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501


        :return: The to_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501
        :rtype: int
        """
        return self._to_currency_decimal_places

    @to_currency_decimal_places.setter
    def to_currency_decimal_places(self, to_currency_decimal_places):
        """Sets the to_currency_decimal_places of this ExchangeRateAttributes.


        :param to_currency_decimal_places: The to_currency_decimal_places of this ExchangeRateAttributes.  # noqa: E501
        :type: int
        """

        self._to_currency_decimal_places = to_currency_decimal_places

    @property
    def to_currency_id(self):
        """Gets the to_currency_id of this ExchangeRateAttributes.  # noqa: E501


        :return: The to_currency_id of this ExchangeRateAttributes.  # noqa: E501
        :rtype: int
        """
        return self._to_currency_id

    @to_currency_id.setter
    def to_currency_id(self, to_currency_id):
        """Sets the to_currency_id of this ExchangeRateAttributes.


        :param to_currency_id: The to_currency_id of this ExchangeRateAttributes.  # noqa: E501
        :type: int
        """

        self._to_currency_id = to_currency_id

    @property
    def to_currency_symbol(self):
        """Gets the to_currency_symbol of this ExchangeRateAttributes.  # noqa: E501


        :return: The to_currency_symbol of this ExchangeRateAttributes.  # noqa: E501
        :rtype: str
        """
        return self._to_currency_symbol

    @to_currency_symbol.setter
    def to_currency_symbol(self, to_currency_symbol):
        """Sets the to_currency_symbol of this ExchangeRateAttributes.


        :param to_currency_symbol: The to_currency_symbol of this ExchangeRateAttributes.  # noqa: E501
        :type: str
        """

        self._to_currency_symbol = to_currency_symbol

    @property
    def updated_at(self):
        """Gets the updated_at of this ExchangeRateAttributes.  # noqa: E501


        :return: The updated_at of this ExchangeRateAttributes.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this ExchangeRateAttributes.


        :param updated_at: The updated_at of this ExchangeRateAttributes.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, ExchangeRateAttributes):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, ExchangeRateAttributes):
            return True

        return self.to_dict() != other.to_dict()
